<?php 
/*
 module:		MBTI测试验证器
 create_time:	2024-04-18 11:14:31
 author:		
 contact:		
*/

namespace app\admin\validate\Mbti;
use think\validate;

class Lists extends validate {


	protected $rule = [
		'title'=>['require'],
		'edition'=>['require'],
		'img'=>['require'],
		'price'=>['regex'=>'/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/'],
	];

	protected $message = [
		'title.require'=>'标题不能为空',
		'edition.require'=>'版本不能为空',
		'img.require'=>'缩略图不能为空',
		'price.regex'=>'价格设置格式错误',
	];

	protected $scene  = [
		'edit'=>['title','edition','img','price'],
		'add'=>['title','edition','img','price'],
	];



}

